﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ywxt.NewsPush.Models.Doors
{
    public class PageModelDoorIndex
    {
        /// <summary>
        /// 当前登陆用户所能开门的列表
        /// </summary>
        public List<GXJDDoor> Doors { get; set; }

        public PageModelDoorIndex()
        {
            Doors = new List<GXJDDoor>();
        }
    }

    /// <summary>
    /// 广西机电门禁的门定义
    /// </summary>
    public class GXJDDoor
    {
        /// <summary>
        /// 门控制器对应的串口号
        /// </summary>
        public string ComPort { get; set; }

        /// <summary>
        /// 门名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public short Address { get; set; }

        /// <summary>
        /// 读卡器编号
        /// </summary>
        public string ReaderNumber { get; set; }
    }

    /// <summary>
    /// 开门指令类
    /// </summary>
    public class CommandModel
    {
        /// <summary>
        /// 操作人姓名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 门控制器对应的串口号
        /// </summary>
        public string ComPort { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public short Address { get; set; }

        /// <summary>
        /// 读卡器编号
        /// </summary>
        public string ReaderNumber { get; set; }
    }

    /// <summary>
    /// 开门指令结果返回类
    /// </summary>
    public class ResultModel
    {
        /// <summary>
        /// 是否正确标志
        /// </summary>
        public bool isok { get; set; }

        /// <summary>
        /// 返回消息
        /// </summary>
        public string message { get; set; }
    }
}